﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
using WLWeb.PulbicClass;

namespace WLWeb.Common
{
    public partial class About : System.Web.UI.Page
    {
        string CategoryId = "";
        BLL.wlBLL.Acticle art = new BLL.wlBLL.Acticle();
        protected void Page_Load(object sender, EventArgs e)
        {
            webleft1.Acticle = Webpublic.GetGroupName(8);
            webleft1.Title = "关于我们";
            InitDataShow();
        }

        protected void InitDataShow()
        {
            //string group = lblAbout.Text.Trim();
            //DataTable dtArtcle = art.GetActicleInfo(new Hashtable() { { "OtherCategoryGroup", group } });         //根据组别可查出给定组别的数据
            //if (dtArtcle != null && dtArtcle.Rows.Count > 0)
            //{
            //    lblaboutContent.Text = dtArtcle.Rows[0]["ArticleContent"].ToString();
            //}
            string group = Webpublic.GetGroupName(8);
            if (Request.QueryString["OtherCategoryID"] != null && !string.IsNullOrEmpty(Request.QueryString["OtherCategoryID"].ToString()))
            {
                CategoryId = Request.QueryString["OtherCategoryID"].ToString();
            }
            if (CategoryId != "")
            {
                DataTable dtcontent = art.GetActicleInfo(new Hashtable() { { "OtherCategoryID", CategoryId } });             //获取产品服务此组数据
                if (dtcontent != null && dtcontent.Rows.Count > 0)
                {
                    lblaboutContent.Text = dtcontent.Rows[0]["ArticleContent"].ToString();
                    litTitle.Text = "您当前的位置：<a href=\"../Common/Index\">网站首页</a> &gt;&gt;" + dtcontent.Rows[0]["OtherCategoryName"].ToString();
                    litHead.Text = dtcontent.Rows[0]["OtherCategoryName"].ToString();
                }
            }
            else
            {
                DataTable dtcontent = art.GetActicleInfo(new Hashtable() { { "OtherCategoryGroup", group } });             //获取产品服务此组数据
                if (dtcontent != null && dtcontent.Rows.Count > 0)
                {
                    lblaboutContent.Text = dtcontent.Rows[0]["ArticleContent"].ToString();
                    litTitle.Text = "您当前的位置：<a href=\"../Common/Index\">网站首页</a> &gt;&gt;" + dtcontent.Rows[0]["OtherCategoryName"].ToString();
                    litHead.Text = dtcontent.Rows[0]["OtherCategoryName"].ToString();
                }
            }
        }
    }
}